<?php

/**
 * MockComparable class
 * a mock IRaiseComparable object
 *
 * @author Sam-Mauris Yong / hellclanner at live dot com
 * @license http://www.opensource.org/licenses/bsd-license New BSD License
 * @package Raise.UnitTest.Mocks
 */
class MockComparable extends RaiseObject implements IRaiseComparable {

    private $value;

    public function __construct($value){
        $this->value = $value;
    }

    public function value(){
        return $this->value;
    }

    /**
     * Compare with another MockComparable
     * @param MockComparable $o2
     * @return integer
     */
    public function compareTo($o2) {
        return $this->value() > $o2->value() ? 1 : -1 ;
    }

}

